<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="./css/x-admin.css" media="all">
    <link rel="stylesheet" href="./lib/layui-v2.5.5/css/layui.css">
</head>
<body>
<form class="layui-form layui-form-pane" action="/scoreeditmdiff" method="post">
    <table class="layui-table">
        <thead>
        <tr>
            <th>ID</th>
            <th>学生姓名</th>
            <th>科目名称</th>
            <th>成绩</th>
        </tr>
        </thead>
        <tbody>
          <c:forEach items="${list}" var="score">
              <tr>
                  <td><input type="text" class="layui-hide" name="sid" value="${score.sid}">${score.sid}</td>
                  <td>${score.stuname}</td>
                  <td>${score.couname}</td>
                  <td><input type="text" id="L_titles1" name="subject" required
                            class="layui-input" style="width: 200px" value="${score.subject}"></td>
              </tr>
          </c:forEach>
        </tbody>
    </table>
    <div class="layui-form-item">
        <button class="layui-btn" lay-filter="add" lay-submit>
            立即发布
        </button>
    </div>
</form>
<c:if test="${ok!=null}">
    <script>
        alert('添加成功！');
        location.href='/subjectShow.jsp?couname=${score.couname}';

    </script>
</c:if>
<c:if test="${error!=null}">
    <script>
        alert('添加失败！');
    </script>
</c:if>
</body>
</html>
